/* $Header: p_struct.c,v 2.2 01/10/02 10:27:53 przybyls Exp $ */

/***********************************************************************/
/*                                                                     */
/*                  Copyright Hewlett-Packard Co. 1991                 */
/*                                                                     */
/***********************************************************************/

/***********************************************************************/
/* MODULE NAME:                                                        */
/* ============                                                        */
/*                                                                     */
/* Author:                                                             */
/*                                                                     */
/* MODULE PURPOSE:                                                     */
/*                                                                     */
/*                                                                     */
/*                                                                     */
/*                                                                     */
/***********************************************************************/


/*****************************/
/*   GLOBAL INCLUDE FILES    */
/*****************************/

#include <typedefs.h>
#include <error.h>
#include <p_wkfile.h>
#include <wkfile.h>
#include <p_status.h>
#include <ramps.h>         /* needed for status.h */
#include <clock_ui.h>      /* needed for InitializeDateTime */
#include <list_mgmt.h>
#include <pcb_defs.h>
#include <keyboard.h>

/*****************************/
/*   LOCAL INCLUDE FILES     */
/*****************************/

#include "proto.h"
#include "p_tcomp.h"
#include "pneu_int.h"

/*****************************/
/*   GLOBAL VARIABLES        */
/*****************************/


/*****************************/
/*   EXTERNAL VARIABLES      */
/*****************************/

/* the proto in hostutil.h needs too many other include files to begin including it here */
void StrNCpy(BIT8 *to_str,BIT8 *from_str,INT16 n);

/*****************************/
/*   LOCAL DEFINES           */
/*****************************/


/*****************************/
/*   STATIC VARIABLES        */
/*****************************/


/*****************************/
/*   IMPLEMENT SECTION       */
/*****************************/


/***********************************************************************/
/* FUNCTION:                                                           */
/* ========                                                            */
/*                                                                     */
/* PURPOSE:                                                            */
/*                                                                     */
/* RETURNED VALUE:                                                     */
/*                                                                     */
/* GLOBALS USED:                                                       */
/*                                                                     */
/* CALLS:                                                              */
/*                                                                     */
/* LIMITATIONS:                                                        */
/*                                                                     */
/***********************************************************************/

/**begin_proto**/

#pragma SECTION PROG=boot

/**end_proto**/


/**begin_proto**/

void InitPneuConfig(void)

/**end_proto**/
{

    /* powerfail survival needed for these variables */


    Inst_Config.Pneu.Frnt_Inlet.Functional = 			FALSE;
    Inst_Config.Pneu.Frnt_Inlet.Type =                          NO_INLET;
    Inst_Config.Pneu.Frnt_Inlet.P_Sensor_Range =                INVALID_PS_RANGE;
    Inst_Config.Pneu.Frnt_Inlet.Gas_Type =    			UNKNOWN_GAS;
    Inst_Config.Pneu.Frnt_Inlet.Pres_Equib_Time =               6000;
    Inst_Config.Pneu.Frnt_Inlet.Flow_Equib_Time =               6000;
    Inst_Config.Pneu.Frnt_Inlet.FS_Auto_Cal =                   TRUE;

    Inst_Config.Pneu.Back_Inlet.Functional = 			FALSE;
    Inst_Config.Pneu.Back_Inlet.Type =                          NO_INLET;
    Inst_Config.Pneu.Back_Inlet.P_Sensor_Range =                INVALID_PS_RANGE;
    Inst_Config.Pneu.Back_Inlet.Gas_Type =    			UNKNOWN_GAS;
    Inst_Config.Pneu.Back_Inlet.Pres_Equib_Time =               6000;
    Inst_Config.Pneu.Back_Inlet.Flow_Equib_Time =               6000;
    Inst_Config.Pneu.Back_Inlet.FS_Auto_Cal =                   TRUE;


    Inst_Config.Pneu.Column_1.Defined = 			FALSE;
    Inst_Config.Pneu.Column_1.Length = 				0;
    Inst_Config.Pneu.Column_1.Diam = 				0;
    Inst_Config.Pneu.Column_1.Film_Thickness = 			0;
    Inst_Config.Pneu.Column_1.Source = 				FRNT_INLET;
    Inst_Config.Pneu.Column_1.Outlet = 				FRNT_DET;
    Inst_Config.Pneu.Column_1.Vacuum_Comp = 			OFF;
    Inst_Config.Pneu.Column_1.Outlet_Pressure_Correction =      OFF;
    Inst_Config.Pneu.Column_1.Outlet_Correction =               0;
 
    Inst_Config.Pneu.Column_1.Calib.Calib_Length                = 0;
    Inst_Config.Pneu.Column_1.Calib.Calib_Diam                  = 0;
    InitializeDateTime( &Inst_Config.Pneu.Column_1.Calib.Date );
    Inst_Config.Pneu.Column_1.Calib.Holdup_Time                 = 0;
    Inst_Config.Pneu.Column_1.Calib.Measured_Flow               = 0;
    Inst_Config.Pneu.Column_1.Calib.Mode                        = UNCALIBRATED;
    StrNCpy( (BIT8 *)Inst_Config.Pneu.Column_1.ID_String, (BIT8 *)" ", 1 );
    


    Inst_Config.Pneu.Column_2.Defined = 			FALSE;
    Inst_Config.Pneu.Column_2.Length = 				0;
    Inst_Config.Pneu.Column_2.Diam = 				0;
    Inst_Config.Pneu.Column_2.Film_Thickness = 			0;
    Inst_Config.Pneu.Column_2.Source = 				BACK_INLET;
    Inst_Config.Pneu.Column_2.Outlet = 				BACK_DET;
    Inst_Config.Pneu.Column_2.Vacuum_Comp = 			OFF;
    Inst_Config.Pneu.Column_2.Outlet_Pressure_Correction =      OFF;
    Inst_Config.Pneu.Column_2.Outlet_Correction =               0;

    Inst_Config.Pneu.Column_2.Calib.Calib_Length                = 0;
    Inst_Config.Pneu.Column_2.Calib.Calib_Diam                  = 0;
    InitializeDateTime( &Inst_Config.Pneu.Column_2.Calib.Date );
    Inst_Config.Pneu.Column_2.Calib.Holdup_Time                 = 0;
    Inst_Config.Pneu.Column_2.Calib.Measured_Flow               = 0;
    Inst_Config.Pneu.Column_2.Calib.Mode                        = UNCALIBRATED;
    StrNCpy( (BIT8 *)Inst_Config.Pneu.Column_2.ID_String, (BIT8 *)" ", 1 );




    Inst_Config.Pneu.Frnt_Detector.Functional = 		FALSE;
    Inst_Config.Pneu.Frnt_Detector.Type = 			(EEPROM_DET_TYPE)NO_DET;
    Inst_Config.Pneu.Frnt_Detector.Gas_1.Gas_Type = 		UNKNOWN_GAS;
    Inst_Config.Pneu.Frnt_Detector.Gas_2.Gas_Type = 		UNKNOWN_GAS;
    Inst_Config.Pneu.Frnt_Detector.Gas_3.Gas_Type = 		UNKNOWN_GAS;
    Inst_Config.Pneu.Frnt_Detector.Gas_1.P_Sensor_Range =       INVALID_PS_RANGE;
    Inst_Config.Pneu.Frnt_Detector.Gas_2.P_Sensor_Range =       INVALID_PS_RANGE;
    Inst_Config.Pneu.Frnt_Detector.Gas_3.P_Sensor_Range =       INVALID_PS_RANGE;



    Inst_Config.Pneu.Back_Detector.Functional = 		FALSE;
    Inst_Config.Pneu.Back_Detector.Type = 			(EEPROM_DET_TYPE)NO_DET;
    Inst_Config.Pneu.Back_Detector.Gas_1.Gas_Type = 		UNKNOWN_GAS;
    Inst_Config.Pneu.Back_Detector.Gas_2.Gas_Type = 		UNKNOWN_GAS;
    Inst_Config.Pneu.Back_Detector.Gas_3.Gas_Type = 		UNKNOWN_GAS;
    Inst_Config.Pneu.Back_Detector.Gas_1.P_Sensor_Range =       INVALID_PS_RANGE;
    Inst_Config.Pneu.Back_Detector.Gas_2.P_Sensor_Range =       INVALID_PS_RANGE;
    Inst_Config.Pneu.Back_Detector.Gas_3.P_Sensor_Range =       INVALID_PS_RANGE;



    Inst_Config.Pneu.Aux_3.Functional = 			FALSE;
    Inst_Config.Pneu.Aux_3.Gas_Type = 				UNKNOWN_GAS;
    Inst_Config.Pneu.Aux_3.Pres_Equib_Time =                    6000;
    Inst_Config.Pneu.Aux_3.P_Sensor_Range =       		INVALID_PS_RANGE;

    Inst_Config.Pneu.Aux_4.Functional = 			FALSE;
    Inst_Config.Pneu.Aux_4.Gas_Type = 				UNKNOWN_GAS;
    Inst_Config.Pneu.Aux_4.Pres_Equib_Time =                    6000;
    Inst_Config.Pneu.Aux_4.P_Sensor_Range =       		INVALID_PS_RANGE;

    Inst_Config.Pneu.Aux_5.Functional = 			FALSE;
    Inst_Config.Pneu.Aux_5.Gas_Type = 				UNKNOWN_GAS;
    Inst_Config.Pneu.Aux_5.Pres_Equib_Time =                    6000;
    Inst_Config.Pneu.Aux_5.P_Sensor_Range =       		INVALID_PS_RANGE;

    Inst_Config.Pneu.Pressure_Display_Units =                   DISPLAY_PSI;

    Inst_Config.Pneu.Dirt_Ball = 			        TRUE;    

}





/**begin_proto**/

void LinkPneuStructs(void)

/**end_proto**/
{

    /* standard table cross linkages */

    Inst_Status.Pneu.Config = 					&Inst_Config.Pneu;
    Inst_Status.Pneu.Wkfile = 					&Active_Wkfile.Pneu;

    Inst_Status.Pneu.Frnt_Inlet.Config = 			&Inst_Config.Pneu.Frnt_Inlet;
    Inst_Status.Pneu.Frnt_Inlet.Wkfile = 			&Active_Wkfile.Pneu.Frnt_Inlet;

    Inst_Status.Pneu.Back_Inlet.Config = 			&Inst_Config.Pneu.Back_Inlet;
    Inst_Status.Pneu.Back_Inlet.Wkfile = 			&Active_Wkfile.Pneu.Back_Inlet;

    Inst_Status.Pneu.Column_1.Config = 				&Inst_Config.Pneu.Column_1;
    Inst_Status.Pneu.Column_1.Wkfile = 				&Active_Wkfile.Pneu.Column_1;
    Inst_Status.Pneu.Column_1.Ramp_Info =			pCol1Ramp();

    Inst_Status.Pneu.Column_2.Config = 				&Inst_Config.Pneu.Column_2;
    Inst_Status.Pneu.Column_2.Wkfile = 				&Active_Wkfile.Pneu.Column_2;
    Inst_Status.Pneu.Column_2.Ramp_Info =			pCol2Ramp();

    Inst_Status.Pneu.Frnt_Detector.Config = 			&Inst_Config.Pneu.Frnt_Detector;
    Inst_Status.Pneu.Frnt_Detector.Wkfile = 			&Active_Wkfile.Pneu.Frnt_Detector;

    Inst_Status.Pneu.Back_Detector.Config = 			&Inst_Config.Pneu.Back_Detector;
    Inst_Status.Pneu.Back_Detector.Wkfile = 			&Active_Wkfile.Pneu.Back_Detector;

    Inst_Status.Pneu.Aux.Aux_3.Config = 			&Inst_Config.Pneu.Aux_3;
    Inst_Status.Pneu.Aux.Aux_3.Wkfile = 			&Active_Wkfile.Pneu.Aux_3;
    Inst_Status.Pneu.Aux.Aux_3.Ramp_Info =			pAux3Ramp();

    Inst_Status.Pneu.Aux.Aux_4.Config = 			&Inst_Config.Pneu.Aux_4;
    Inst_Status.Pneu.Aux.Aux_4.Wkfile = 			&Active_Wkfile.Pneu.Aux_4;
    Inst_Status.Pneu.Aux.Aux_4.Ramp_Info =			pAux4Ramp();

    Inst_Status.Pneu.Aux.Aux_5.Config = 			&Inst_Config.Pneu.Aux_5;
    Inst_Status.Pneu.Aux.Aux_5.Wkfile = 			&Active_Wkfile.Pneu.Aux_5;
    Inst_Status.Pneu.Aux.Aux_5.Ramp_Info =			pAux5Ramp();

    Inst_Status.Pneu.Frnt_Inlet.Tcomp_Tables =                  &Frnt_Inlet_Tcomp_Tables;
    Inst_Status.Pneu.Back_Inlet.Tcomp_Tables =                  &Back_Inlet_Tcomp_Tables;
    Inst_Status.Pneu.Frnt_Detector.Tcomp_Tables =               &Frnt_Det_Tcomp_Tables;
    Inst_Status.Pneu.Back_Detector.Tcomp_Tables =               &Back_Det_Tcomp_Tables;
    Inst_Status.Pneu.Aux.Tcomp_Tables =                         &Pneu_Aux_Tcomp_Tables;

    Inst_Status.Pneu.Frnt_Detector.Gas_1.Tcomp_Tables =         &Frnt_Det_Tcomp_Tables.Fuel;
    Inst_Status.Pneu.Frnt_Detector.Gas_2.Tcomp_Tables =         &Frnt_Det_Tcomp_Tables.Util;
    Inst_Status.Pneu.Frnt_Detector.Gas_3.Tcomp_Tables =         &Frnt_Det_Tcomp_Tables.Mug;

    Inst_Status.Pneu.Back_Detector.Gas_1.Tcomp_Tables =         &Back_Det_Tcomp_Tables.Fuel;
    Inst_Status.Pneu.Back_Detector.Gas_2.Tcomp_Tables =         &Back_Det_Tcomp_Tables.Util;
    Inst_Status.Pneu.Back_Detector.Gas_3.Tcomp_Tables =         &Back_Det_Tcomp_Tables.Mug;

    /* Identify Positions */

    Inst_Status.Pneu.Frnt_Inlet.Position =                      FRNT_INLET;
    Inst_Status.Pneu.Back_Inlet.Position =                      BACK_INLET;
 
    Inst_Status.Pneu.Column_1.Position =                        1;
    Inst_Status.Pneu.Column_2.Position =                        2;

    Inst_Status.Pneu.Frnt_Detector.Position =                   FRNT_DET;
    Inst_Status.Pneu.Back_Detector.Position =                   BACK_DET;

    Inst_Status.Pneu.Aux.Aux_3.Position =                       AUX_3;
    Inst_Status.Pneu.Aux.Aux_4.Position =                       AUX_4;
    Inst_Status.Pneu.Aux.Aux_5.Position =                       AUX_5;

    Inst_Status.Pneu.Frnt_Inlet.Module_Number =                 FRNT_INLET_MODULE_NUMBER;
    Inst_Status.Pneu.Back_Inlet.Module_Number =                 BACK_INLET_MODULE_NUMBER;

    Inst_Status.Pneu.Frnt_Detector.Module_Number =              FRNT_DETECTOR_MODULE_NUMBER;
    Inst_Status.Pneu.Back_Detector.Module_Number =              BACK_DETECTOR_MODULE_NUMBER;

    Inst_Status.Pneu.Aux.Module_Number =                        PNEU_AUX_MODULE_NUMBER;
    Inst_Status.Pneu.Aux.Aux_3.Module_Number =                  PNEU_AUX_MODULE_NUMBER;
    Inst_Status.Pneu.Aux.Aux_4.Module_Number =                  PNEU_AUX_MODULE_NUMBER;
    Inst_Status.Pneu.Aux.Aux_5.Module_Number =                  PNEU_AUX_MODULE_NUMBER;

}

/**begin_proto**/

#pragma SECTION UNDO

/**end_proto**/



/**begin_proto**/

void InitPneuStatus(void)

/**end_proto**/
{

     Inst_Status.Pneu.Block_Foreground_Interrupts = FALSE;

     Inst_Status.Pneu.Environment_Freq = 50; /* once per 1 sec update */
     Inst_Status.Pneu.Auto_Cal_Delay   = 75;

     /* test code to steve craig to to rms errors to find flow noise */
     Inst_Status.Pneu.RMS_Interval              = 100; /* 2 Seconds */

     Inst_Status.Pneu.Raw_Rdg_Index             =  0;

     Atmospheric_Pressure.Dcm2_80  = 0x317c; /* 14.70 psia@80  dcm2_per_iu */
     Atmospheric_Pressure.Dcm2_160 = 0x18bE; /* 14.70 psia@160 dcm2_per_iu */
     Atmospheric_Pressure.Dcm2_320 = 0x0c5f; /* 14.70 psia@320 dcm2_per_iu */


    Inst_Status.Pneu.Avg_Ctrl_Time = 0;
    Inst_Status.Pneu.Avg_Disp_Time = 0;
    Inst_Status.Pneu.Peak_Ctrl_Time = 0;
    Inst_Status.Pneu.Peak_Disp_Time = 0;


    Inst_Status.Pneu.Frnt_Inlet.Has_Column     = FALSE;
    Inst_Status.Pneu.Back_Inlet.Has_Column     = FALSE;
    Inst_Status.Pneu.Aux.Aux_3.Has_Column      = FALSE;
    Inst_Status.Pneu.Aux.Aux_4.Has_Column      = FALSE;
    Inst_Status.Pneu.Aux.Aux_5.Has_Column      = FALSE;

    Inst_Status.Pneu.Installing_Method         = FALSE;


   /* initialize ambient temps to a reasonable value (25C) */

   Inst_Status.Pneu.Frnt_Inlet.Tcomp_Tables->Thermistor.Module_Temperature = 0x4a80;
   Inst_Status.Pneu.Back_Inlet.Tcomp_Tables->Thermistor.Module_Temperature = 0x4a80;
   Inst_Status.Pneu.Frnt_Detector.Tcomp_Tables->Thermistor.Module_Temperature = 0x4a80;
   Inst_Status.Pneu.Back_Detector.Tcomp_Tables->Thermistor.Module_Temperature = 0x4a80;
   Inst_Status.Pneu.Aux.Tcomp_Tables->Thermistor.Module_Temperature = 0x4a80;

   Inst_Status.Pneu.Frnt_Inlet.Tcomp_Tables->Pres_Sensor.Temp_Comp_Enabled         = TRUE;
   Inst_Status.Pneu.Frnt_Inlet.Tcomp_Tables->Flow_Sensor.Temp_Comp_Enabled         = TRUE;

   Inst_Status.Pneu.Back_Inlet.Tcomp_Tables->Pres_Sensor.Temp_Comp_Enabled         = TRUE;
   Inst_Status.Pneu.Back_Inlet.Tcomp_Tables->Flow_Sensor.Temp_Comp_Enabled         = TRUE;

   Inst_Status.Pneu.Frnt_Detector.Tcomp_Tables->Fuel.Pres_Sensor.Temp_Comp_Enabled = TRUE;
   Inst_Status.Pneu.Frnt_Detector.Tcomp_Tables->Util.Pres_Sensor.Temp_Comp_Enabled = TRUE;
   Inst_Status.Pneu.Frnt_Detector.Tcomp_Tables->Mug.Pres_Sensor.Temp_Comp_Enabled  = TRUE;
   Inst_Status.Pneu.Frnt_Detector.Tcomp_Tables->Fuel.Frit.Temp_Comp_Enabled        = TRUE;
   Inst_Status.Pneu.Frnt_Detector.Tcomp_Tables->Util.Frit.Temp_Comp_Enabled        = TRUE;
   Inst_Status.Pneu.Frnt_Detector.Tcomp_Tables->Mug.Frit.Temp_Comp_Enabled         = TRUE;

   Inst_Status.Pneu.Back_Detector.Tcomp_Tables->Fuel.Pres_Sensor.Temp_Comp_Enabled = TRUE;
   Inst_Status.Pneu.Back_Detector.Tcomp_Tables->Util.Pres_Sensor.Temp_Comp_Enabled = TRUE;
   Inst_Status.Pneu.Back_Detector.Tcomp_Tables->Mug.Pres_Sensor.Temp_Comp_Enabled  = TRUE;
   Inst_Status.Pneu.Back_Detector.Tcomp_Tables->Fuel.Frit.Temp_Comp_Enabled        = TRUE;
   Inst_Status.Pneu.Back_Detector.Tcomp_Tables->Util.Frit.Temp_Comp_Enabled        = TRUE;
   Inst_Status.Pneu.Back_Detector.Tcomp_Tables->Mug.Frit.Temp_Comp_Enabled         = TRUE;

   Inst_Status.Pneu.Aux.Tcomp_Tables->Aux_3.Temp_Comp_Enabled                      = TRUE;
   Inst_Status.Pneu.Aux.Tcomp_Tables->Aux_4.Temp_Comp_Enabled                      = TRUE;
   Inst_Status.Pneu.Aux.Tcomp_Tables->Aux_5.Temp_Comp_Enabled                      = TRUE;

   Inst_Status.Pneu.Column_1.Atm_Pres_Comp_Enabled                                 = TRUE;
   Inst_Status.Pneu.Column_2.Atm_Pres_Comp_Enabled                                 = TRUE;

   Inst_Status.Pneu.Frnt_Inlet.Something_There                                     = FALSE;
   Inst_Status.Pneu.Back_Inlet.Something_There                                     = FALSE;
   Inst_Status.Pneu.Frnt_Detector.Something_There                                  = FALSE;
   Inst_Status.Pneu.Back_Detector.Something_There                                  = FALSE;
   Inst_Status.Pneu.Aux.Something_There                                            = FALSE;

   
   Inst_Status.Pneu.Frnt_Inlet.IU_Scaling               = 16384;
   Inst_Status.Pneu.Back_Inlet.IU_Scaling               = 16384;

   Inst_Status.Pneu.Frnt_Inlet.Dcm2_Per_IU              = 160;
   Inst_Status.Pneu.Back_Inlet.Dcm2_Per_IU              = 160;

   Inst_Status.Pneu.Frnt_Inlet.P_Sensor_Range           = INVALID_PS_RANGE;
   Inst_Status.Pneu.Back_Inlet.P_Sensor_Range           = INVALID_PS_RANGE;



   Inst_Status.Pneu.Frnt_Detector.Gas_1.Dcm2_Per_IU     = 160;
   Inst_Status.Pneu.Frnt_Detector.Gas_2.Dcm2_Per_IU     = 160;
   Inst_Status.Pneu.Frnt_Detector.Gas_3.Dcm2_Per_IU     = 160;

   Inst_Status.Pneu.Frnt_Detector.IU_Scaling            = DET_FLOW_IU_SCALE;
   Inst_Status.Pneu.Frnt_Detector.Gas_1.IU_Scaling      = DET_FLOW_IU_SCALE;
   Inst_Status.Pneu.Frnt_Detector.Gas_2.IU_Scaling      = DET_FLOW_IU_SCALE;
   Inst_Status.Pneu.Frnt_Detector.Gas_3.IU_Scaling      = DET_FLOW_IU_SCALE;

   Inst_Status.Pneu.Frnt_Detector.Gas_1.P_Sensor_Range  = INVALID_PS_RANGE;
   Inst_Status.Pneu.Frnt_Detector.Gas_2.P_Sensor_Range  = INVALID_PS_RANGE;
   Inst_Status.Pneu.Frnt_Detector.Gas_3.P_Sensor_Range  = INVALID_PS_RANGE;



   Inst_Status.Pneu.Back_Detector.Gas_1.Dcm2_Per_IU     = 160;
   Inst_Status.Pneu.Back_Detector.Gas_2.Dcm2_Per_IU     = 160;
   Inst_Status.Pneu.Back_Detector.Gas_3.Dcm2_Per_IU     = 160;

   Inst_Status.Pneu.Back_Detector.IU_Scaling            = DET_FLOW_IU_SCALE;
   Inst_Status.Pneu.Back_Detector.Gas_1.IU_Scaling      = DET_FLOW_IU_SCALE;
   Inst_Status.Pneu.Back_Detector.Gas_2.IU_Scaling      = DET_FLOW_IU_SCALE;
   Inst_Status.Pneu.Back_Detector.Gas_3.IU_Scaling      = DET_FLOW_IU_SCALE;

   Inst_Status.Pneu.Back_Detector.Gas_1.P_Sensor_Range  = INVALID_PS_RANGE;
   Inst_Status.Pneu.Back_Detector.Gas_2.P_Sensor_Range  = INVALID_PS_RANGE;
   Inst_Status.Pneu.Back_Detector.Gas_3.P_Sensor_Range  = INVALID_PS_RANGE;



   Inst_Status.Pneu.Aux.Aux_3.Dcm2_Per_IU               = 160;
   Inst_Status.Pneu.Aux.Aux_4.Dcm2_Per_IU               = 160;
   Inst_Status.Pneu.Aux.Aux_5.Dcm2_Per_IU               = 160;

   Inst_Status.Pneu.Aux.Aux_3.P_Sensor_Range            = INVALID_PS_RANGE;
   Inst_Status.Pneu.Aux.Aux_4.P_Sensor_Range            = INVALID_PS_RANGE;
   Inst_Status.Pneu.Aux.Aux_5.P_Sensor_Range            = INVALID_PS_RANGE;




   Inst_Status.Pneu.Frnt_Inlet.PCB_Inlet_Control_Mode =  FWD_PRES_NO_FLOW;

   Inst_Status.Pneu.Frnt_Inlet.Shutdown =                       FALSE;
   Inst_Status.Pneu.Frnt_Inlet.Setpt_Correct_Ratio =            ATMP_FLOW_CORRECT_SCALING;
   Inst_Status.Pneu.Frnt_Inlet.Actual_Correct_Ratio =           ATMP_FLOW_CORRECT_SCALING;
   Inst_Status.Pneu.Frnt_Inlet.Has_Column =                     FALSE;
   Inst_Status.Pneu.Frnt_Inlet.Inlet_Purge =       		FALSE;
   Inst_Status.Pneu.Frnt_Inlet.Miser_Mode =      		FALSE;
   Inst_Status.Pneu.Frnt_Inlet.Flow_Adc_Setpt =		 	0;
   Inst_Status.Pneu.Frnt_Inlet.Pres_Adc_Setpt =	 		0;
   Inst_Status.Pneu.Frnt_Inlet.Flow_Adc_Actual =		0;
   Inst_Status.Pneu.Frnt_Inlet.Pres_Adc_Actual =	 	0;
   Inst_Status.Pneu.Frnt_Inlet.Position =	 		FRNT_INLET;
   Inst_Status.Pneu.Frnt_Inlet.Setpt_Oven_Temp =		( 273 + 50 ) * 64;
   Inst_Status.Pneu.Frnt_Inlet.Actual_Oven_Temp =		( 273 + 50 ) * 64;

 
   Inst_Status.Pneu.Frnt_Inlet.Ready.Pres.State =		NOT_IN_CONTROL_;
   Inst_Status.Pneu.Frnt_Inlet.Ready.Pres.Tic_Counter =		0;
   Inst_Status.Pneu.Frnt_Inlet.Ready.Pres.Timeout =		0;
   Inst_Status.Pneu.Frnt_Inlet.Ready.Pres.Not_Ready_Delay =	PRES_NOT_READY_DELAY;
   Inst_Status.Pneu.Frnt_Inlet.Ready.Pres.Reported_Ready =	FALSE;

   Inst_Status.Pneu.Frnt_Inlet.Ready.Flow.State =		NOT_IN_CONTROL_;
   Inst_Status.Pneu.Frnt_Inlet.Ready.Flow.Tic_Counter =		0;
   Inst_Status.Pneu.Frnt_Inlet.Ready.Flow.Timeout =		0;
   Inst_Status.Pneu.Frnt_Inlet.Ready.Flow.Not_Ready_Delay =	FLOW_NOT_READY_DELAY;
   Inst_Status.Pneu.Frnt_Inlet.Ready.Flow.Reported_Ready =	FALSE;

   Inst_Status.Pneu.Frnt_Inlet.Diag_Mode_Enabled =		FALSE;
   Inst_Status.Pneu.Frnt_Inlet.Solenoid_Valve_Enable =		FALSE;
   Inst_Status.Pneu.Frnt_Inlet.Flow_Sensor_Zero_State =		(U_INT32)OK;




               
   Inst_Status.Pneu.Back_Inlet.PCB_Inlet_Control_Mode =  FWD_PRES_NO_FLOW;

   Inst_Status.Pneu.Back_Inlet.Shutdown =                       FALSE;
   Inst_Status.Pneu.Back_Inlet.Setpt_Correct_Ratio =            ATMP_FLOW_CORRECT_SCALING;
   Inst_Status.Pneu.Back_Inlet.Actual_Correct_Ratio =           ATMP_FLOW_CORRECT_SCALING;
   Inst_Status.Pneu.Back_Inlet.Has_Column =                     FALSE;
   Inst_Status.Pneu.Back_Inlet.Inlet_Purge =       		FALSE;
   Inst_Status.Pneu.Back_Inlet.Miser_Mode =                     FALSE;
   Inst_Status.Pneu.Back_Inlet.Flow_Adc_Setpt =		 	0;
   Inst_Status.Pneu.Back_Inlet.Pres_Adc_Setpt =	 		0;
   Inst_Status.Pneu.Back_Inlet.Flow_Adc_Actual =		0;
   Inst_Status.Pneu.Back_Inlet.Pres_Adc_Actual =	 	0;
   Inst_Status.Pneu.Back_Inlet.Position =	 		BACK_INLET;
   Inst_Status.Pneu.Back_Inlet.Setpt_Oven_Temp =		( 273 + 50 ) * 64;
   Inst_Status.Pneu.Back_Inlet.Actual_Oven_Temp =		( 273 + 50 ) * 64;

   Inst_Status.Pneu.Back_Inlet.Ready.Pres.State =		NOT_IN_CONTROL_;
   Inst_Status.Pneu.Back_Inlet.Ready.Pres.Tic_Counter =		0;
   Inst_Status.Pneu.Back_Inlet.Ready.Pres.Timeout =		0;
   Inst_Status.Pneu.Back_Inlet.Ready.Pres.Not_Ready_Delay =	PRES_NOT_READY_DELAY;
   Inst_Status.Pneu.Back_Inlet.Ready.Pres.Reported_Ready =	FALSE;

   Inst_Status.Pneu.Back_Inlet.Ready.Flow.State =		NOT_IN_CONTROL_;
   Inst_Status.Pneu.Back_Inlet.Ready.Flow.Tic_Counter =		0;
   Inst_Status.Pneu.Back_Inlet.Ready.Flow.Timeout =		0;
   Inst_Status.Pneu.Back_Inlet.Ready.Flow.Not_Ready_Delay =	FLOW_NOT_READY_DELAY;
   Inst_Status.Pneu.Back_Inlet.Ready.Flow.Reported_Ready =	FALSE;

   Inst_Status.Pneu.Back_Inlet.Diag_Mode_Enabled =		FALSE;
   Inst_Status.Pneu.Back_Inlet.Solenoid_Valve_Enable =		FALSE;
   Inst_Status.Pneu.Back_Inlet.Flow_Sensor_Zero_State =		(U_INT32)OK;
               




   Inst_Status.Pneu.Column_1.Ramp_Setpt.Head_Pressure =		GetRampInitValue(Inst_Status.Pneu.Column_1.Ramp_Info);
   Inst_Status.Pneu.Column_1.Ramp_Setpt.Column_V_Flow =		GetRampInitValue(Inst_Status.Pneu.Column_1.Ramp_Info);
   Inst_Status.Pneu.Column_1.Ramp_Setpt.Ramp_Flow_Scaling = 	16384;
   Inst_Status.Pneu.Column_1.Ramp_Setpt.Ramp_Pres_Scaling = 	160;
   Inst_Status.Pneu.Column_1.IU_Scaling = 			16384;
   Inst_Status.Pneu.Column_1.Dcm2_Per_IU =                      160;  /* default, overwritten by p_init */
   Inst_Status.Pneu.Column_1.Desired_Head_Pressure = 		0;
   Inst_Status.Pneu.Column_1.Desired_Column_Flow = 		0;
   Inst_Status.Pneu.Column_1.Current_Head_Pressure =	 	0;
   Inst_Status.Pneu.Column_1.Current_V_Flow = 			0;
   Inst_Status.Pneu.Column_1.C1 = 				0;
   Inst_Status.Pneu.Column_1.C2 = 				0;
   Inst_Status.Pneu.Column_1.C3 = 				0;
   Inst_Status.Pneu.Column_1.C4 = 				0;
   Inst_Status.Pneu.Column_1.Gas_Type = 			UNKNOWN_GAS;
   
               

   Inst_Status.Pneu.Column_2.Ramp_Setpt.Head_Pressure =		GetRampInitValue(Inst_Status.Pneu.Column_1.Ramp_Info);
   Inst_Status.Pneu.Column_2.Ramp_Setpt.Column_V_Flow =		GetRampInitValue(Inst_Status.Pneu.Column_1.Ramp_Info);
   Inst_Status.Pneu.Column_2.Ramp_Setpt.Ramp_Flow_Scaling = 	16384;
   Inst_Status.Pneu.Column_2.Ramp_Setpt.Ramp_Pres_Scaling = 	160;
   Inst_Status.Pneu.Column_2.IU_Scaling = 			16384;
   Inst_Status.Pneu.Column_2.Dcm2_Per_IU =                      160;  /* default, overwritten by p_init */
   Inst_Status.Pneu.Column_2.Desired_Head_Pressure = 		0;
   Inst_Status.Pneu.Column_2.Desired_Column_Flow = 		0;
   Inst_Status.Pneu.Column_2.Current_Head_Pressure =	 	0;
   Inst_Status.Pneu.Column_2.Current_V_Flow = 			0;
   Inst_Status.Pneu.Column_2.C1 = 				0;
   Inst_Status.Pneu.Column_2.C2 = 				0;
   Inst_Status.Pneu.Column_2.C3 = 				0;
   Inst_Status.Pneu.Column_2.C4 = 				0;
   Inst_Status.Pneu.Column_2.Gas_Type = 			UNKNOWN_GAS;

   
               
   Inst_Status.Pneu.Frnt_Detector.Shutdown =                    FALSE;
   Inst_Status.Pneu.Frnt_Detector.Gas_1.Shutdown =              FALSE;
   Inst_Status.Pneu.Frnt_Detector.Gas_2.Shutdown =              FALSE;
   Inst_Status.Pneu.Frnt_Detector.Gas_3.Shutdown =              FALSE;
   Inst_Status.Pneu.Frnt_Detector.Gas_1.On_Off =                Active_Wkfile.Pneu.Frnt_Detector.Gas_1.On_Off;
   Inst_Status.Pneu.Frnt_Detector.Gas_2.On_Off =                Active_Wkfile.Pneu.Frnt_Detector.Gas_2.On_Off;
   Inst_Status.Pneu.Frnt_Detector.Gas_3.On_Off =                Active_Wkfile.Pneu.Frnt_Detector.Gas_3.On_Off;
   Inst_Status.Pneu.Frnt_Detector.Gas_1.Desired_Flow =		Active_Wkfile.Pneu.Frnt_Detector.Gas_1.Desired_Flow;
   Inst_Status.Pneu.Frnt_Detector.Gas_1.Adc_Setpt =      	0;
   Inst_Status.Pneu.Frnt_Detector.Gas_1.Current_Pres =	0;
   Inst_Status.Pneu.Frnt_Detector.Gas_1.Filtered_Current_Flow =  	0;
   Inst_Status.Pneu.Frnt_Detector.Gas_2.Desired_Flow =		Active_Wkfile.Pneu.Frnt_Detector.Gas_2.Desired_Flow;
   Inst_Status.Pneu.Frnt_Detector.Gas_2.Adc_Setpt =      	0;
   Inst_Status.Pneu.Frnt_Detector.Gas_2.Current_Pres =	0;
   Inst_Status.Pneu.Frnt_Detector.Gas_2.Filtered_Current_Flow =  	0;
   Inst_Status.Pneu.Frnt_Detector.Gas_3.Desired_Flow =		Active_Wkfile.Pneu.Frnt_Detector.Gas_3.Desired_Flow;
   Inst_Status.Pneu.Frnt_Detector.Gas_3.Adc_Setpt =      	0;
   Inst_Status.Pneu.Frnt_Detector.Gas_3.Current_Pres =	0;
   Inst_Status.Pneu.Frnt_Detector.Gas_3.Filtered_Current_Flow =  	0;
               
   Inst_Status.Pneu.Frnt_Detector.Ready.Fuel_Flow.State =		NOT_IN_CONTROL_;
   Inst_Status.Pneu.Frnt_Detector.Ready.Fuel_Flow.Tic_Counter =		0;
   Inst_Status.Pneu.Frnt_Detector.Ready.Fuel_Flow.Timeout =		0;
   Inst_Status.Pneu.Frnt_Detector.Ready.Fuel_Flow.Not_Ready_Delay =	DET_NOT_READY_DELAY;
   Inst_Status.Pneu.Frnt_Detector.Ready.Fuel_Flow.Reported_Ready =	FALSE;

   Inst_Status.Pneu.Frnt_Detector.Ready.Util_Flow.State =		NOT_IN_CONTROL_;
   Inst_Status.Pneu.Frnt_Detector.Ready.Util_Flow.Tic_Counter =		0;
   Inst_Status.Pneu.Frnt_Detector.Ready.Util_Flow.Timeout =		0;
   Inst_Status.Pneu.Frnt_Detector.Ready.Util_Flow.Not_Ready_Delay =	DET_NOT_READY_DELAY;
   Inst_Status.Pneu.Frnt_Detector.Ready.Util_Flow.Reported_Ready =	FALSE;

   Inst_Status.Pneu.Frnt_Detector.Ready.Mug_Flow.State =		NOT_IN_CONTROL_;
   Inst_Status.Pneu.Frnt_Detector.Ready.Mug_Flow.Tic_Counter =		0;
   Inst_Status.Pneu.Frnt_Detector.Ready.Mug_Flow.Timeout =		0;
   Inst_Status.Pneu.Frnt_Detector.Ready.Mug_Flow.Not_Ready_Delay =	DET_NOT_READY_DELAY;
   Inst_Status.Pneu.Frnt_Detector.Ready.Mug_Flow.Reported_Ready =	FALSE;

   Inst_Status.Pneu.Frnt_Detector.Ready.Fuel_Pres.State =		NOT_IN_CONTROL_;
   Inst_Status.Pneu.Frnt_Detector.Ready.Fuel_Pres.Tic_Counter =		0;
   Inst_Status.Pneu.Frnt_Detector.Ready.Fuel_Pres.Timeout =		0;
   Inst_Status.Pneu.Frnt_Detector.Ready.Fuel_Pres.Not_Ready_Delay =	DET_NOT_READY_DELAY;
   Inst_Status.Pneu.Frnt_Detector.Ready.Fuel_Pres.Reported_Ready =	FALSE;

   Inst_Status.Pneu.Frnt_Detector.Ready.Util_Pres.State =		NOT_IN_CONTROL_;
   Inst_Status.Pneu.Frnt_Detector.Ready.Util_Pres.Tic_Counter =		0;
   Inst_Status.Pneu.Frnt_Detector.Ready.Util_Pres.Timeout =		0;
   Inst_Status.Pneu.Frnt_Detector.Ready.Util_Pres.Not_Ready_Delay =	DET_NOT_READY_DELAY;
   Inst_Status.Pneu.Frnt_Detector.Ready.Util_Pres.Reported_Ready =	FALSE;

   Inst_Status.Pneu.Frnt_Detector.Ready.Mug_Pres.State =		NOT_IN_CONTROL_;
   Inst_Status.Pneu.Frnt_Detector.Ready.Mug_Pres.Tic_Counter =		0;
   Inst_Status.Pneu.Frnt_Detector.Ready.Mug_Pres.Timeout =		0;
   Inst_Status.Pneu.Frnt_Detector.Ready.Mug_Pres.Not_Ready_Delay =	DET_NOT_READY_DELAY;
   Inst_Status.Pneu.Frnt_Detector.Ready.Mug_Pres.Reported_Ready =	FALSE;

   Inst_Status.Pneu.Back_Detector.Shutdown =                    FALSE;
   Inst_Status.Pneu.Back_Detector.Gas_1.Shutdown =              FALSE;
   Inst_Status.Pneu.Back_Detector.Gas_2.Shutdown =              FALSE;
   Inst_Status.Pneu.Back_Detector.Gas_3.Shutdown =              FALSE;
   Inst_Status.Pneu.Back_Detector.Gas_1.On_Off =                Active_Wkfile.Pneu.Back_Detector.Gas_1.On_Off;
   Inst_Status.Pneu.Back_Detector.Gas_2.On_Off =                Active_Wkfile.Pneu.Back_Detector.Gas_2.On_Off;
   Inst_Status.Pneu.Back_Detector.Gas_3.On_Off =                Active_Wkfile.Pneu.Back_Detector.Gas_3.On_Off;
   Inst_Status.Pneu.Back_Detector.Gas_1.Desired_Flow =		Active_Wkfile.Pneu.Back_Detector.Gas_1.Desired_Flow;
   Inst_Status.Pneu.Back_Detector.Gas_1.Adc_Setpt =      	0;
   Inst_Status.Pneu.Back_Detector.Gas_1.Current_Pres =	0;
   Inst_Status.Pneu.Back_Detector.Gas_1.Filtered_Current_Flow =  	0;
   Inst_Status.Pneu.Back_Detector.Gas_2.Desired_Flow =		Active_Wkfile.Pneu.Back_Detector.Gas_2.Desired_Flow;
   Inst_Status.Pneu.Back_Detector.Gas_2.Adc_Setpt =      	0;
   Inst_Status.Pneu.Back_Detector.Gas_2.Current_Pres =	0;
   Inst_Status.Pneu.Back_Detector.Gas_2.Filtered_Current_Flow =  	0;
   Inst_Status.Pneu.Back_Detector.Gas_3.Desired_Flow =		Active_Wkfile.Pneu.Back_Detector.Gas_3.Desired_Flow;
   Inst_Status.Pneu.Back_Detector.Gas_3.Adc_Setpt =      	0;
   Inst_Status.Pneu.Back_Detector.Gas_3.Current_Pres =	0;
   Inst_Status.Pneu.Back_Detector.Gas_3.Filtered_Current_Flow =  	0;

               
   Inst_Status.Pneu.Back_Detector.Ready.Fuel_Flow.State =		NOT_IN_CONTROL_;
   Inst_Status.Pneu.Back_Detector.Ready.Fuel_Flow.Tic_Counter =		0;
   Inst_Status.Pneu.Back_Detector.Ready.Fuel_Flow.Timeout =		0;
   Inst_Status.Pneu.Back_Detector.Ready.Fuel_Flow.Not_Ready_Delay =	DET_NOT_READY_DELAY;
   Inst_Status.Pneu.Back_Detector.Ready.Fuel_Flow.Reported_Ready =	FALSE;

   Inst_Status.Pneu.Back_Detector.Ready.Util_Flow.State =		NOT_IN_CONTROL_;
   Inst_Status.Pneu.Back_Detector.Ready.Util_Flow.Tic_Counter =		0;
   Inst_Status.Pneu.Back_Detector.Ready.Util_Flow.Timeout =		0;
   Inst_Status.Pneu.Back_Detector.Ready.Util_Flow.Not_Ready_Delay =	DET_NOT_READY_DELAY;
   Inst_Status.Pneu.Back_Detector.Ready.Util_Flow.Reported_Ready =	FALSE;

   Inst_Status.Pneu.Back_Detector.Ready.Mug_Flow.State =		NOT_IN_CONTROL_;
   Inst_Status.Pneu.Back_Detector.Ready.Mug_Flow.Tic_Counter =		0;
   Inst_Status.Pneu.Back_Detector.Ready.Mug_Flow.Timeout =		0;
   Inst_Status.Pneu.Back_Detector.Ready.Mug_Flow.Not_Ready_Delay =	DET_NOT_READY_DELAY;
   Inst_Status.Pneu.Back_Detector.Ready.Mug_Flow.Reported_Ready =	FALSE;

   Inst_Status.Pneu.Back_Detector.Ready.Fuel_Pres.State =		NOT_IN_CONTROL_;
   Inst_Status.Pneu.Back_Detector.Ready.Fuel_Pres.Tic_Counter =		0;
   Inst_Status.Pneu.Back_Detector.Ready.Fuel_Pres.Timeout =		0;
   Inst_Status.Pneu.Back_Detector.Ready.Fuel_Pres.Not_Ready_Delay =	DET_NOT_READY_DELAY;
   Inst_Status.Pneu.Back_Detector.Ready.Fuel_Pres.Reported_Ready =	FALSE;

   Inst_Status.Pneu.Back_Detector.Ready.Util_Pres.State =		NOT_IN_CONTROL_;
   Inst_Status.Pneu.Back_Detector.Ready.Util_Pres.Tic_Counter =		0;
   Inst_Status.Pneu.Back_Detector.Ready.Util_Pres.Timeout =		0;
   Inst_Status.Pneu.Back_Detector.Ready.Util_Pres.Not_Ready_Delay =	DET_NOT_READY_DELAY;
   Inst_Status.Pneu.Back_Detector.Ready.Util_Pres.Reported_Ready =	FALSE;

   Inst_Status.Pneu.Back_Detector.Ready.Mug_Pres.State =		NOT_IN_CONTROL_;
   Inst_Status.Pneu.Back_Detector.Ready.Mug_Pres.Tic_Counter =		0;
   Inst_Status.Pneu.Back_Detector.Ready.Mug_Pres.Timeout =		0;
   Inst_Status.Pneu.Back_Detector.Ready.Mug_Pres.Not_Ready_Delay =	DET_NOT_READY_DELAY;
   Inst_Status.Pneu.Back_Detector.Ready.Mug_Pres.Reported_Ready =	FALSE;


   Inst_Status.Pneu.Aux.Aux_3.On_Off =				Active_Wkfile.Pneu.Aux_3.On_Off;
   Inst_Status.Pneu.Aux.Aux_3.Shutdown =                        FALSE;
   Inst_Status.Pneu.Aux.Aux_3.Ramp_Setpt.Ramp_Pressure =	GetRampInitValue(Inst_Status.Pneu.Aux.Aux_3.Ramp_Info);
   Inst_Status.Pneu.Aux.Aux_3.Ramp_Setpt.Ramp_Pres_Scaling = 	160;
   Inst_Status.Pneu.Aux.Aux_3.Adc_Setpt =       		0;
   Inst_Status.Pneu.Aux.Aux_3.Flow_Correct_Ratio =		ATMP_FLOW_CORRECT_SCALING;
               
   Inst_Status.Pneu.Aux.Aux_3.Ready.Pres.State =		NOT_IN_CONTROL_;
   Inst_Status.Pneu.Aux.Aux_3.Ready.Pres.Tic_Counter =		0;
   Inst_Status.Pneu.Aux.Aux_3.Ready.Pres.Timeout =		0;
   Inst_Status.Pneu.Aux.Aux_3.Ready.Pres.Not_Ready_Delay =	PRES_NOT_READY_DELAY;
   Inst_Status.Pneu.Aux.Aux_3.Ready.Pres.Reported_Ready =	FALSE;

   Inst_Status.Pneu.Aux.Aux_4.On_Off =				Active_Wkfile.Pneu.Aux_4.On_Off;
   Inst_Status.Pneu.Aux.Aux_4.Shutdown =                        FALSE;
   Inst_Status.Pneu.Aux.Aux_4.Ramp_Setpt.Ramp_Pressure =	GetRampInitValue(Inst_Status.Pneu.Aux.Aux_4.Ramp_Info);
   Inst_Status.Pneu.Aux.Aux_4.Ramp_Setpt.Ramp_Pres_Scaling = 	160;
   Inst_Status.Pneu.Aux.Aux_4.Adc_Setpt =       		0;
   Inst_Status.Pneu.Aux.Aux_4.Flow_Correct_Ratio =		ATMP_FLOW_CORRECT_SCALING;

   Inst_Status.Pneu.Aux.Aux_4.Ready.Pres.State =		NOT_IN_CONTROL_;
   Inst_Status.Pneu.Aux.Aux_4.Ready.Pres.Tic_Counter =		0;
   Inst_Status.Pneu.Aux.Aux_4.Ready.Pres.Timeout =		0;
   Inst_Status.Pneu.Aux.Aux_4.Ready.Pres.Not_Ready_Delay =	PRES_NOT_READY_DELAY;
   Inst_Status.Pneu.Aux.Aux_4.Ready.Pres.Reported_Ready =	FALSE;

   Inst_Status.Pneu.Aux.Aux_5.On_Off =				Active_Wkfile.Pneu.Aux_5.On_Off;
   Inst_Status.Pneu.Aux.Aux_5.Shutdown =                        FALSE;
   Inst_Status.Pneu.Aux.Aux_5.Ramp_Setpt.Ramp_Pressure =	GetRampInitValue(Inst_Status.Pneu.Aux.Aux_5.Ramp_Info);
   Inst_Status.Pneu.Aux.Aux_5.Ramp_Setpt.Ramp_Pres_Scaling = 	160;
   Inst_Status.Pneu.Aux.Aux_5.Adc_Setpt =               	0;
   Inst_Status.Pneu.Aux.Aux_5.Flow_Correct_Ratio =		ATMP_FLOW_CORRECT_SCALING;
               
   Inst_Status.Pneu.Aux.Aux_5.Ready.Pres.State =		NOT_IN_CONTROL_;
   Inst_Status.Pneu.Aux.Aux_5.Ready.Pres.Tic_Counter =		0;
   Inst_Status.Pneu.Aux.Aux_5.Ready.Pres.Timeout =		0;
   Inst_Status.Pneu.Aux.Aux_5.Ready.Pres.Not_Ready_Delay =	PRES_NOT_READY_DELAY;
   Inst_Status.Pneu.Aux.Aux_5.Ready.Pres.Reported_Ready =	FALSE;


   Inst_Status.Pneu.Pneu_Alive =                                FALSE;

}

/***********************************************************************/
/* FUNCTION:                                                           */
/* ========                                                            */
/*                                                                     */
/* PURPOSE:                                                            */
/*                                                                     */
/* RETURNED VALUE:                                                     */
/*                                                                     */
/* GLOBALS USED:                                                       */
/*                                                                     */
/* CALLS:                                                              */
/*                                                                     */
/* LIMITATIONS:                                                        */
/*                                                                     */
/***********************************************************************/
/**begin_proto**/

void InitPneuStores(void)

/**end_proto**/
{

   InitPneuStatus();

}
/***********************************************************************/
/* FUNCTION:                                                           */
/* ========                                                            */
/*                                                                     */
/* PURPOSE:                                                            */
/*                                                                     */
/* RETURNED VALUE:                                                     */
/*                                                                     */
/* GLOBALS USED:                                                       */
/*                                                                     */
/***********************************************************************/
/**begin_proto**/

void *GetRampInfoPtr( /*pCOLUMN_STATUS*/void *status )

/**end_proto**/
{

   return ((pCOLUMN_STATUS)status)->Ramp_Info;

}

/**begin_proto**/

void MakeThisADirtball( void )

/**end_proto**/
{

    switch ( Inst_Config.Pneu.Frnt_Inlet.Type )
    {
         case  NO_INLET:          /* this is ALSO a "type" of manual inlet, albeit particularly degenerate ! */
         case  MANUAL_PP:
         case  MANUAL_SS:
         case  MANUAL_COC:
         case  MANUAL_ACI: break; /* The preceeding 5 types are EXPLICITLY known types & should be preserved as-is . */
                                  /* This even applies to NO_INLET which is the intentional absence of any inlet h/w */

         case PP:  Inst_Config.Pneu.Frnt_Inlet.Type = MANUAL_PP;  break;
         case SS:  Inst_Config.Pneu.Frnt_Inlet.Type = MANUAL_SS;  break;
         case COC: Inst_Config.Pneu.Frnt_Inlet.Type = MANUAL_COC; break;
         case ACI: Inst_Config.Pneu.Frnt_Inlet.Type = MANUAL_ACI; break;
         default:    Inst_Config.Pneu.Frnt_Inlet.Type = UNKNOWN_INLET;    /* Note that UNKNOWN_INLET is not the same */
                                                                          /* as NO_INLET !!                          */
    }

    switch ( Inst_Config.Pneu.Back_Inlet.Type )
    {
         case  NO_INLET:          /* this is ALSO a "type" of manual inlet, albeit particularly degenerate ! */
         case  MANUAL_PP:
         case  MANUAL_SS:
         case  MANUAL_COC:
         case  MANUAL_ACI: break; /* The preceeding 5 types are EXPLICITLY known types & should be preserved as-is . */
                                  /* This even applies to NO_INLET which is the intentional absence of any inlet h/w */

         case PP:  Inst_Config.Pneu.Back_Inlet.Type = MANUAL_PP;  break;
         case SS:  Inst_Config.Pneu.Back_Inlet.Type = MANUAL_SS;  break;
         case COC: Inst_Config.Pneu.Back_Inlet.Type = MANUAL_COC; break;
         case ACI: Inst_Config.Pneu.Back_Inlet.Type = MANUAL_ACI; break;
         default:    Inst_Config.Pneu.Back_Inlet.Type = UNKNOWN_INLET;    /* Note that UNKNOWN_INLET is not the same */
                                                                          /* as NO_INLET !!                          */
    }

    Inst_Config.Pneu.Frnt_Detector.Type  = (EEPROM_DET_TYPE)((U_INT16)Inst_Config.Pneu.Frnt_Detector.Type & ~EPC_DET_BIT);
    Inst_Config.Pneu.Back_Detector.Type  = (EEPROM_DET_TYPE)((U_INT16)Inst_Config.Pneu.Back_Detector.Type & ~EPC_DET_BIT);

/*  Inst_Config.Pneu.Frnt_Inlet.Functional = FALSE;      */
/*  Inst_Config.Pneu.Back_Inlet.Functional = FALSE;      */


    Inst_Config.Pneu.Aux_3.Functional = FALSE;
    Inst_Config.Pneu.Aux_4.Functional = FALSE;
    Inst_Config.Pneu.Aux_5.Functional = FALSE;

    Inst_Status.Pneu.Frnt_Inlet.IU_Scaling   = 16384;
    Inst_Status.Pneu.Frnt_Inlet.Dcm2_Per_IU  = 160;
    Inst_Status.Pneu.Back_Inlet.IU_Scaling   = 16384;
    Inst_Status.Pneu.Back_Inlet.Dcm2_Per_IU  = 160;

/* revisit, what about detector range, and max flow ? */

    Inst_Status.Pneu.Aux.Aux_3.Dcm2_Per_IU       = 160;
    Inst_Status.Pneu.Aux.Aux_4.Dcm2_Per_IU       = 160;
    Inst_Status.Pneu.Aux.Aux_5.Dcm2_Per_IU       = 160;


    Inst_Status.Pneu.Frnt_Inlet.Tcomp_Tables->Flow_Sensor.Parms.Max_Flow = 
            200 * Inst_Status.Pneu.Frnt_Inlet.IU_Scaling;


    Inst_Status.Pneu.Back_Inlet.Tcomp_Tables->Flow_Sensor.Parms.Max_Flow = 
            200 * Inst_Status.Pneu.Back_Inlet.IU_Scaling;


      /* these are used by method upload and download */

    Inst_Config.Pneu.Frnt_Inlet.P_Sensor_Range = INVALID_PS_RANGE;
    Inst_Config.Pneu.Back_Inlet.P_Sensor_Range = INVALID_PS_RANGE;
    Inst_Config.Pneu.Aux_3.P_Sensor_Range      = INVALID_PS_RANGE;
    Inst_Config.Pneu.Aux_4.P_Sensor_Range      = INVALID_PS_RANGE;
    Inst_Config.Pneu.Aux_5.P_Sensor_Range      = INVALID_PS_RANGE;

     /* these should be used by the flow calculator */

    Inst_Status.Pneu.Frnt_Inlet.P_Sensor_Range   = 6894757 / 160;
    Inst_Status.Pneu.Back_Inlet.P_Sensor_Range   = 6894757 / 160;
    Inst_Status.Pneu.Aux.Aux_3.P_Sensor_Range    = 6894757 / 160;
    Inst_Status.Pneu.Aux.Aux_4.P_Sensor_Range    = 6894757 / 160;
    Inst_Status.Pneu.Aux.Aux_5.P_Sensor_Range    = 6894757 / 160;


}




/**begin_proto**/

void UpdateShadowedSetpts ( void )

/**end_proto**/
{

   Inst_Status.Pneu.Frnt_Detector.Gas_1.On_Off =                Active_Wkfile.Pneu.Frnt_Detector.Gas_1.On_Off;
   Inst_Status.Pneu.Frnt_Detector.Gas_2.On_Off =                Active_Wkfile.Pneu.Frnt_Detector.Gas_2.On_Off;
   Inst_Status.Pneu.Frnt_Detector.Gas_3.On_Off =                Active_Wkfile.Pneu.Frnt_Detector.Gas_3.On_Off;
   Inst_Status.Pneu.Frnt_Detector.Gas_1.Desired_Flow =		Active_Wkfile.Pneu.Frnt_Detector.Gas_1.Desired_Flow;
   Inst_Status.Pneu.Frnt_Detector.Gas_2.Desired_Flow =		Active_Wkfile.Pneu.Frnt_Detector.Gas_2.Desired_Flow;
   Inst_Status.Pneu.Frnt_Detector.Gas_3.Desired_Flow =		Active_Wkfile.Pneu.Frnt_Detector.Gas_3.Desired_Flow;
               
   Inst_Status.Pneu.Back_Detector.Gas_1.On_Off =                Active_Wkfile.Pneu.Back_Detector.Gas_1.On_Off;
   Inst_Status.Pneu.Back_Detector.Gas_2.On_Off =                Active_Wkfile.Pneu.Back_Detector.Gas_2.On_Off;
   Inst_Status.Pneu.Back_Detector.Gas_3.On_Off =                Active_Wkfile.Pneu.Back_Detector.Gas_3.On_Off;
   Inst_Status.Pneu.Back_Detector.Gas_1.Desired_Flow =		Active_Wkfile.Pneu.Back_Detector.Gas_1.Desired_Flow;
   Inst_Status.Pneu.Back_Detector.Gas_2.Desired_Flow =		Active_Wkfile.Pneu.Back_Detector.Gas_2.Desired_Flow;
   Inst_Status.Pneu.Back_Detector.Gas_3.Desired_Flow =		Active_Wkfile.Pneu.Back_Detector.Gas_3.Desired_Flow;

   Inst_Status.Pneu.Aux.Aux_3.On_Off =				Active_Wkfile.Pneu.Aux_3.On_Off;
   Inst_Status.Pneu.Aux.Aux_4.On_Off =				Active_Wkfile.Pneu.Aux_4.On_Off;
   Inst_Status.Pneu.Aux.Aux_5.On_Off =				Active_Wkfile.Pneu.Aux_5.On_Off;
               
}
